<template>
	<view class="malldetail-buy">
		<view class="service" @click="goService">
			<image class="malldetail-star-img" src="../../static/good/kf.png" mode=""></image>
			<view>客服</view>
		</view>
		<text class="malldetail-now-buy" @click="nowBuy()">单独购买</text>
		<text class="malldetail-shopcart-add" @click="addCart()">我要开团</text> 		
	</view>
</template>

<script>
	export default {
		name: 'good-action',
		props: {
			isCollect: {
				type: Boolean,
				default: false
			}
		},
		data(){
			return{
				hasCollect:false,
			}
		},
		onLoad() {
			this.hasCollect = this.isCollect
		},
		methods: {
			
			// 客服
			goService(){
				uni.navigateTo({
					url:'/pages/service/service'
				})
			},
			
			// 我要开团
			addCart() {
				this.$emit('addCart')
			},
			// 单独购买
			nowBuy() {
				this.$emit('nowBuy')
			}
		}
	}
</script>

<style lang="scss">
	.malldetail-buy {
		padding: 10rpx 20rpx 10rpx 40rpx;
		position: fixed;
		bottom: 0rpx;
		left: 0rpx;
		right: 0rpx;		
		background-color: #ffffff;	
		border-top: 1rpx solid #F0F0F0;
		text-align: center;
		display: flex;
		justify-content: space-between;
		align-items: center;
	
	}


	.malldetail-star-img {
		width: 38rpx;
		height: 35rpx;
		
	}

	.malldetail-shopcart-add {
		padding: 26rpx 88rpx;
		
		border-radius:46rpx;
		background:#F72A4C;
		font-size:28rpx;
		font-family:PingFang;
		font-weight:bold;
		color:rgba(255,255,255,1);
		
	}

	.malldetail-now-buy {
		padding: 26rpx 88rpx;		
		border-radius:45rpx;
		border: 1rpx solid #F82E4F;
		font-size:28rpx;
		font-family:PingFang;
		font-weight:bold;
		color:rgba(248,46,79,1);
	}
</style>
